# Update Data Monitor

Note: modification of `configuration.id` or set of `dataSources` starts background process
that populates processing log for all Business Partners from data monitor scope.

Endpoint: PUT /v2/storages/{storageId}/datamonitors/{dataMonitorId}
Version: 5
Security: apiKey

## Security:

  - `apiKey` (unknown)
    apiKey in header X-API-KEY

## Path parameters:

  - `storageId` (string, required)
    Unique identifier of the Storage.

  - `dataMonitorId` (string, required)
    Unique ID of a Data Monitor.

## Request fields (application/json):

  - `dataSources` (array, required)
    List of Data Sources.

  - `dataSources.id` (string, required)
    Unique identifier for a Data Source of the Storage.
    Example: 648824a691d8d2503d65103e

  - `enabled` (boolean)
    The toggle used to enable or disable the Data Monitor.
    Example: true

  - `configuration` (object)
    Configuration which is used during processing Business Partners.

  - `configuration.id` (string, required)
    Uniquely identifies a configuration.
    Example: c074b9f3-abf0-4f8e-9a20-74deb6cfa2a4

  - `executions` (array, required)
    Available executions of data monitor.

  - `executions.type` (object, required)
    Type of the Data Monitor Execution.

  - `executions.type.technicalKey` (string, required)
    Technical key of the Data Monitor Execution Type.
    Enum: "TRIGGER"

  - `executions.frequency` (string)
    List of Data Monitor Frequency parapeters.
    Enum: "BI_WEEKLY", "MONTHLY", "QUARTERLY"

  - `validitySpan` (object)
    Period after which Business Partner is evaluated again.

  - `validitySpan.technicalKey` (string)
    Validity span period.
    Enum: "HALF_YEAR", "QUARTER", "YEAR"

  - `scopes` (array)
    Scope to be enabled for monitor.

  - `scopes.technicalKey` (string)
    Data Monitor scope of selected products.
Augmentation Data Monitor may be one of:
* AUGMENTED_BUSINESS_PARTNERS - enables Business Partner Augmentation
* RAW_UPDATES - enables Raw Updates
* OVERLAP - enables Overlap

By default, when empty in Augmentation Data Monitor, below are enabled:
* AUGMENTED_BUSINESS_PARTNERS
* RAW_UPDATES
    Example: RAW_UPDATES

  - `featuresOn` (array)
    Features to be activated for Data Monitor.

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `created` (integer)
    Number of created Data Sources for monitoring.
    Example: 4

  - `updated` (integer)
    Number of updated Data Sources for monitoring.
    Example: 0

  - `failed` (integer)
    Number of failed updates.
    Example: 4

